﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SMTC.Model.Model;
using SMTC.BO.Line;
/// <summary>
/// Summary description for LineViewDataSource
/// </summary>
public class LineViewDataSource
{
	public LineViewDataSource()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    private LineQueryServices _services = new LineQueryServices();

    public List<SMT_LineModel> Select(string LineName, int LineTargetTime, string ModifyPerson, int LineCapacity, string startTime, string endTime, string sel)
    {
        DateTime startTime1 = Convert.ToDateTime(startTime);
        DateTime endTime1 = Convert.ToDateTime(endTime);
        if (sel == "1")
        {
            return _services.GetLineListForSelect(LineName, LineTargetTime, ModifyPerson, LineCapacity, startTime1, endTime1);
        }
        else
        {
            return _services.GetLineList(LineName, LineTargetTime, ModifyPerson, LineCapacity, startTime1, endTime1);
        }
    }
}